Servo motors are great for robotic creatures, indicators and other projects where a specific angular turn is required.
Connect the wire from the servo to the SERVOS 1 connector on the Kitronik board. Make sure the yellow wire connects to SIG and the brown wire to GND Connect a battery to the + and - connectors (+ to red) on the Kitronik board.
You need to add the Kitronik extension. Copy the PicoRobotics.py file from the lib directory on github to the lib directory on the pico:
Write this code and download to the Pico.
See code on github# Test servo with kitronik robotics board
import PicoRobotics
import time
# Create robotics object
robot = PicoRobotics.KitronikPicoRobotics()
# Move servo 1 through different angles
robot.servoWrite(1, 20)
time.sleep(2)
robot.servoWrite(1, 160)
time.sleep(2)
robot.servoWrite(1, 90)
The motor should turn to the 3 angles.